package com.blog.cloud.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.blog.cloud.api.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;

/**
 * 菜单权限表(Menu)表实体类
 *
 * @author 龙茶清欢
 * @since 2023-02-26 19:12:23
 */
@Getter
@Setter
@TableName("t_menu")
@Schema(name = "菜单权限表实体", description = "菜单权限表映射")
public class Menu extends BaseEntity implements Serializable {
    @Serial
    private static final long serialVersionUID = -99420245088367832L;

    @TableId(value = "menu_id" , type = IdType.AUTO)
    @Schema(description = "菜单ID")
    private Long menuId;

    @TableField(value = "name")
    @Schema(description = "菜单名称")
    private String name;
    
    @TableField(value = "path")
    @Schema(description = "前端URL")
    private String path;
    
    @TableField(value = "icon")
    @Schema(description = "图标")
    private String icon;
    
    @TableField(value = "type")
    @Schema(description = "菜单类型(0-菜单 1-按钮)")
    private String type;
    
    @TableField(value = "permission")
    @Schema(description = "菜单权限标识")
    private String permission;
    
    @TableField(value = "parent_id")
    @Schema(description = "父菜单ID")
    private Long parentId;
    
    @TableField(value = "sort")
    @Schema(description = "排序值")
    private Integer sort;
    
    @TableField(value = "status")
    @Schema(description = "状态(0-开启 1-关闭)")
    private Integer status;
}

